# Maintainer: Alexey Pavlov <alexpux@gmail.com>

pkgname=gengetopt
pkgver=2.22.6
pkgrel=2
pkgdesc="A tool to write command line option parsing code for C programs."
arch=('i686' 'x86_64' 'arm' 'armv6h')
url="http://www.gnu.org/software/gengetopt/gengetopt.html"
license="GPL"
options=('!docs' '!makeflags')
makedepends=('bison' 'flex' 'gcc' 'help2man')
source=(ftp://ftp.gnu.org/gnu/gengetopt/${pkgname}-${pkgver}.tar.gz{,.sig}
        msysize.patch)
md5sums=('29749a48dda69277ab969c510597a14e'
         'SKIP'
         '5f68146992cdfdda0b25141382fd3edb')

prepare() {
  cd ${srcdir}/${pkgname}-${pkgver}
  patch -p1 -i ${srcdir}/msysize.patch
}

build() {
  cd ${srcdir}/${pkgname}-${pkgver}

  ./configure --prefix=/usr
  make
}

package() {
  cd ${srcdir}/${pkgname}-${pkgver}
  make DESTDIR=${pkgdir} install
}
